package cn.yitun.chat.yitunserverimapicore.business.user.service.impl;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.CrudServiceImpl;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.userchat.UserHeadDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.userchat.UserHeadInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.userchat.UserHeadVo;
import cn.yitun.chat.yitunserverimapicore.business.user.service.UserHeadService;
import cn.yitun.chat.yitunserverimbase.dao.userchat.UserHeadDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 
 * @author: yitun
 * @date 2018-01-29 14:38:30
 */
@Service
@Transactional
@Slf4j
public class UserHeadServiceImpl
		extends CrudServiceImpl<UserHeadDao, UserHeadDto, UserHeadInfo, UserHeadVo>
		implements UserHeadService {


	public UserHeadVo getUserHeadByUserId(Long userId) {
		return dao.getLastByUserId(userId);
	}

	public List<UserHeadVo> getUserCategoryMemberUserHeadListByUserId(Long userId) {
		return dao.getUserCategoryMemberUserHeadListByUserId(userId);
	}

	public List<UserHeadVo> getUserHeadListByUserIds(List<Long> ids) {
		return dao.getUserHeadListByUserIds(ids);
	}
}
